//
//  AppDelegate.m
//  TxyxSDKDemo
//
//  Created by Karate on 2021/11/23.
//

#import "AppDelegate.h"
#import <TxyxSDK/TxyxSDK.h>

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
    [[TxyxSDK sharedInstance] initApi:application urlPre:@"https://api.hexidongkeji.top" didFinishLaunchingWithOptions:launchOptions];//初始化
    return YES;
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation{
    [[TxyxSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation];//URL跳转
    return YES;
}

// NOTE: 9.0以后使用新API接口
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString*, id> *)options{
    [[TxyxSDK sharedInstance] application:app openURL:url options:options];//URL跳转
    return YES;
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
    [[TxyxSDK sharedInstance] application:application handleOpenURL:url];
    return YES;
}


@end
